<template>
  <div class="container">
    <el-container class="home_container">
      <el-header>
        <div class="header">
          <h2>人工智能算法实验室</h2>
        </div>
        <el-button type="danger" @click="loginout">退出登录</el-button>
      </el-header>
      <el-container>
        <el-aside :width="isCollapse ? '64px' : '250px'">
          <div class="toggle-button" @click="tooggleCollapse">|||</div>

          <el-menu :collapse-transition="false" :collapse="isCollapse" :router="true">
            <el-menu-item index="/RegistInformation">
              <i class="el-icon-menu"></i>
              <span slot="title">报名信息</span>
            </el-menu-item>

          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isCollapse: true
    }
  },
  methods: {
    tooggleCollapse() {
      this.isCollapse = !this.isCollapse
    },
    loginout() {
      console.log(222)
      localStorage.clear()
      this.$router.push('/managelogin')
    }
  }
}
</script>

<style scoped>
h2 {
  color: white;
  text-shadow: 5px 2px 5px #a19f9f;
  letter-spacing: 5px;
}
.container {
  height: 100%;
  overflow: scroll;
}

.home-container {
  height: 100%;
}

.el-header {
  background-color: rgb(2, 144, 179);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header {
  display: flex;
  align-items: center;
}

.header img {
  width: 180px;
}

.el-aside {
  background-color: rgb(2, 144, 179);
}
.el-menu-item {
  background: rgb(2, 144, 179);
}
.el-aside .el-menu {
  border-right: none;
}

.el-main {
  background-color: #eaedf1;
}
.el-container.is-vertical {
  height: 100%;
  flex-direction: column;
}
.toggle-button {
  background-color: rgb(2, 144, 179);
  font-size: 10px;
  line-height: 24px;
  color: #fff;
  text-align: center;
  letter-spacing: 0.2em;
  cursor: pointer;
}
</style>
